﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace nextGeneration_app
{
    public partial class confirmation1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Session["confirmationcode"] = contxb.Text;
            string confirmationcode = (string)(Session["confirmationcode"]);

            bool result = teacher_dbManager.confirmationCode(contxb.Text);

            if (result == true)
            {
                FormsAuthentication.RedirectFromLoginPage(contxb.Text,false);
                teacher_dbManager.deleteConfirmationCode(confirmationcode);
                Response.Redirect("createpassword.aspx");
            }
            else
            {
 
            }

        }
    }
}